﻿using System;
using System.Windows;
using Microsoft.Phone.Tasks;

namespace Kiva7.Pages
{
    public partial class FirstStartPage
    {
        public readonly static Uri PageUrl = new Uri("/Pages/FirstStartPage.xaml", UriKind.RelativeOrAbsolute);

        public FirstStartPage()
        {
            InitializeComponent();
            CreateStandardControls();
        }

        private void GetLenderIdClick(object sender, RoutedEventArgs e)
        {
            WebBrowserTask task = new WebBrowserTask
                {
                    Uri = new Uri("http://www.kiva.org/myLenderId")
                };
            task.Show();
        }

        private void RegisterClick(object sender, RoutedEventArgs e)
        {
            WebBrowserTask task = new WebBrowserTask
                {
                    Uri = new Uri( "https://www.kiva.org/register")
                };
            task.Show();
        }

        private void NextClick(object sender, RoutedEventArgs e)
        {
            Pivot.SelectedIndex += 1;
        }

        private void DoneClick(object sender, RoutedEventArgs e)
        {
            GoPageBack();
        }

        //private void LenderIdKeyDown(object sender, KeyEventArgs e)
        //{
        //    if (e.Key == Key.Enter)
        //    {
        //        NavigationService.GoBack();
        //    }

        //}

    }
}